﻿using System;
using System.Collections.Generic;
using System.Text;

namespace P
{
    /// <summary>
    /// 其他方法公共类
    /// </summary>
    public class OtherHelper
    {
        /// <summary>
        /// 根据当前操作系统进行路径转换
        /// </summary>
        /// <returns></returns>
        public string PathFormOS(string path)
        {
            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                return path;
            }
            else if(Environment.OSVersion.Platform == PlatformID.Unix)
            {
                return path.Replace("\\", "/");
            }
            return string.Empty;
        }
    }
}
